package com.ruoyi.kiku.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.kiku.mapper.KikuRecommendAttractionsMapper;
import com.ruoyi.kiku.domain.KikuRecommendAttractions;
import com.ruoyi.kiku.service.IKikuRecommendAttractionsService;

/**
 * 推荐景点Service业务层处理
 *
 * @author TT
 * @date 2025-08-23
 */
@Service
public class KikuRecommendAttractionsServiceImpl implements IKikuRecommendAttractionsService
{
    @Autowired
    private KikuRecommendAttractionsMapper kikuRecommendAttractionsMapper;

    /**
     * 查询推荐景点
     *
     * @param id 推荐景点主键
     * @return 推荐景点
     */
    @Override
    public KikuRecommendAttractions selectKikuRecommendAttractionsById(Long id)
    {
        return kikuRecommendAttractionsMapper.selectKikuRecommendAttractionsById(id);
    }

    /**
     * 查询推荐景点列表
     *
     * @param kikuRecommendAttractions 推荐景点
     * @return 推荐景点
     */
    @Override
    public List<KikuRecommendAttractions> selectKikuRecommendAttractionsList(KikuRecommendAttractions kikuRecommendAttractions)
    {
        return kikuRecommendAttractionsMapper.selectKikuRecommendAttractionsList(kikuRecommendAttractions);
    }

    /**
     * 新增推荐景点
     *
     * @param kikuRecommendAttractions 推荐景点
     * @return 结果
     */
    @Override
    public int insertKikuRecommendAttractions(KikuRecommendAttractions kikuRecommendAttractions)
    {
        kikuRecommendAttractions.setCreateTime(DateUtils.getNowDate());
        return kikuRecommendAttractionsMapper.insertKikuRecommendAttractions(kikuRecommendAttractions);
    }

    /**
     * 修改推荐景点
     *
     * @param kikuRecommendAttractions 推荐景点
     * @return 结果
     */
    @Override
    public int updateKikuRecommendAttractions(KikuRecommendAttractions kikuRecommendAttractions)
    {
        kikuRecommendAttractions.setUpdateTime(DateUtils.getNowDate());
        return kikuRecommendAttractionsMapper.updateKikuRecommendAttractions(kikuRecommendAttractions);
    }

    /**
     * 批量删除推荐景点
     *
     * @param ids 需要删除的推荐景点主键
     * @return 结果
     */
    @Override
    public int deleteKikuRecommendAttractionsByIds(Long[] ids)
    {
        return kikuRecommendAttractionsMapper.deleteKikuRecommendAttractionsByIds(ids);
    }

    /**
     * 删除推荐景点信息
     *
     * @param id 推荐景点主键
     * @return 结果
     */
    @Override
    public int deleteKikuRecommendAttractionsById(Long id)
    {
        return kikuRecommendAttractionsMapper.deleteKikuRecommendAttractionsById(id);
    }
}
